<template>
  <van-nav-bar
    class="navs"
    fixed
    :title="info.title"
    :left-text="info.leftText"
    :left-arrow="info.leftArrow"
    @click-left="onClickLeft"
    @click-right="onClickRight"
    :right-text="info.rightText"
  />
</template>

<script>
export default {
  inject: ['info'],
  data() {
    return {}
  },
  mounted() {
    // console.log(this.info)
  },
  methods: {
    onClickLeft() {
      if (this.info.leftText == '首页') {
        this.$router.push('/index')
      } else {
        this.$router.back()
      }
    },
    onClickRight() {
      return false
      // this.$toast('更多')
    }
  }
}
</script>

<style lang="scss" scoped>
.van-nav-bar{
  height: 46px;
  line-height:46px;
  font-size: 16px;
  font-weight: bold;
}
</style>
